using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WCSFContrib.Extensions.CompositeWeb.Web;

namespace WCSFContrib.Extensions.CompositeWeb.Tests.Web
{
    /// <summary>
    /// Summary description for QueryStringValueFixture
    /// </summary>
    [TestClass]
    public class QueryStringValueFixture
    {
        [TestMethod]
        public void TestCanHandleValueTypes()
        {
            QueryStringValue<Guid> stateValue = new QueryStringValue<Guid>();

            Assert.AreEqual(GetDefault<Guid>(), stateValue.Value);

        }

        [TestMethod]
        public void TestCanHandleNullableTypes()
        {
            QueryStringValue<Guid?> stateValue = new QueryStringValue<Guid?>();

            Assert.AreEqual(GetDefault<Guid?>(), stateValue.Value);

        }

        private static T GetDefault<T>()
        {
            return default(T);
        }

    }
}
